# Maintainer:
# Contributor: Eli Schwartz <eschwartz@archlinux.org>

pkgname=python-pam
pkgver=2.0.2
pkgrel=2
pkgdesc="Pure Python interface to the Pluggable Authentication Modules system on Linux"
arch=('any')
url="https://github.com/FirefighterBlu3/${pkgname}"
license=('MIT')
depends=('pam' 'python-six')
makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel')
source=("https://files.pythonhosted.org/packages/source/${pkgname:0:1}/${pkgname}/${pkgname}-${pkgver}.tar.gz")
sha256sums=('97235235ba9b82dbae8068d1099508455949b275f77273ca22fdbd8b1fb5d950')

build() {
  cd ${pkgname}-${pkgver}
  python -m build --wheel --no-isolation
}

package() {
  cd ${pkgname}-${pkgver}

  python -m installer --destdir="${pkgdir}" dist/*.whl
  install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
